﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SlvPartecipazione
{
    public partial class PulsanteNota : UserControl
    {
        public PulsanteNota()
        {
            InitializeComponent();                
        }
                
        public MainPage.Stato _statoPulsante;

        public void checkStatoPulsante()
        {
            if (_statoPulsante.Equals(MainPage.Stato.corretto))
            {
                img1.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("/SlvPartecipazione;component/IMG/notaVerde.png", UriKind.Relative));
            }
            else if (_statoPulsante.Equals(MainPage.Stato.sbagliato))
            {
                img1.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("/SlvPartecipazione;component/IMG/notaRossa.png", UriKind.Relative));
            }
            else if (_statoPulsante.Equals(MainPage.Stato.eseguito))
            {
                img1.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("/SlvPartecipazione;component/IMG/notaGialla.png", UriKind.Relative));
            }
            else
            {
                img1.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("/SlvPartecipazione;component/IMG/notaGrigia.png", UriKind.Relative));
            }
        }
    }
}
